Camera pose estimation

ABSTRACT

A method of camera pose estimation is provided that includes capturing a model image of a scene at a canonical camera pose, generating an image library from warped images of the model image and the model image, wherein each warped image is a transformation of the model image at a different pre-determined camera pose, capturing an image of the scene as a user moves the camera, reporting the current camera pose as a camera pose of the image when the image is acceptable, conditionally adding the first image to the image library when the first image is acceptable, and re-initializing the current camera pose to a camera pose selected from the image library when the first image is not acceptable.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims benefit of U.S. Provisional Patent ApplicationSer. No. 61/711,992, filed Oct. 10, 2012, which is incorporated byreference herein in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the present invention generally relate to estimating thecurrent pose of a camera as the camera is moved through space.

2. Description of the Related Art

Many interactive, camera-based applications rely on the estimation ofcamera pose with respect to a reference coordinate system. A classicexample of such an application is augmented reality (AR), in which theestimated camera pose determines the perspective rendering of a virtualobject. In general, AR is a live, direct or indirect, view of aphysical, real-world environment which is augmented (or supplemented) bycomputer-generated sensory input such as sound, video, graphics or GPSdata in order to enhance the user's perception of reality. Theaugmentation is conventionally performed in real-time and in semanticcontext with environmental elements, e.g., sports scores on TV during asporting event.

In many AR scenarios, there is constant relative motion between thecamera and the scene. In order to insert a virtual object such that theobject appears geometrically consistent with the scene, the applicationdetermines the relative rotation and translation of the camera withrespect to the scene, i.e., the camera pose.

Typically, once a starting pose estimate for a camera is computed,instantaneous image measurements are fused with past temporalinformation to continually update the camera pose. However, factors suchas occlusion, motion blur, etc., can lead to noisy image measurements ordiscontinuities in temporal information that can render this pose updateprocess unreliable or unstable. Under such circumstances, the camerapose estimate may need to be recovered.

There are two common approaches used for initializing and recovering acamera pose estimate. In one approach, the camera pose estimationalgorithm has a-priori knowledge of the background scene. In thisapproach, warped versions of the background scene are generated in anoffline phase. Thus, to initialize or recover the camera pose estimate,the algorithm can compare input images against the pre-generated warpedimages to estimate the pose.

In another approach, pose-invariant feature descriptors are used. Inthis approach, the features, F, computed from an image are invariant tochanges in camera pose. Thus, even as the camera pose changes from thefirst image I₀, to image I_(t) at time t, the algorithm can establishsufficient matches between F₀ and F_(t) to recover the camera pose attime t. While use of pose-invariant features is powerful, their use isvery computationally intensive, and hence, currently not widely deployedfor embedded real-time use.

SUMMARY

Embodiments of the present invention relate to methods, apparatus, andcomputer readable media for camera pose estimation. In one aspect, amethod of camera pose estimation in a camera is provided that includescapturing a model image of a scene at a pre-determined canonical camerapose, initializing a current camera pose to the pre-determined canonicalcamera pose, generating an image library from a plurality of warpedimages of the model image and the model image, wherein each warped imageis a transformation of the model image at a different pre-determinedcamera pose, and wherein the image library includes the predeterminedcamera pose for each warped image and for the model image, capturing afirst image of the scene as a user moves the camera, reporting thecurrent camera pose as a camera pose of the first image when the firstimage is acceptable, adding the first image to the image library whenthe first image is acceptable, a sufficient amount of time has passedsince another captured image was added to the image library, and thecamera pose of the first image is sufficiently different from all cameraposes in the image library, wherein adding the first image includesadding the camera pose of the first image to the image library, andre-initializing the current camera pose to a camera pose selected fromthe image library when the first image is not acceptable.

In one aspect, an apparatus configured to perform camera pose estimationis provided that includes means for capturing a model image of a sceneat a pre-determined canonical camera pose, means for initializing acurrent camera pose to the pre-determined canonical camera pose,generating an image library from a plurality of warped images of themodel image and the model image, wherein each warped image is atransformation of the model image at a different pre-determined camerapose, and wherein the image library includes the predetermined camerapose for each warped image and for the model image, means for capturinga first image of the scene as a user moves the apparatus, means forreporting the current camera pose as a camera pose of the first imagewhen the first image is acceptable, means for adding the first image tothe image library when the first image is acceptable, a sufficientamount of time has passed since another captured image was added to theimage library, and the camera pose of the first image is sufficientlydifferent from all camera poses in the image library, wherein adding thefirst image includes adding the camera pose of the first image to theimage library, and means for re-initializing the current camera pose toa camera pose selected from the image library when the first image isnot acceptable.

In one aspect, a non-transitory computer readable medium storingsoftware instructions is provided. The software instructions, whenexecuted by at least one processor in a camera, cause a method of camerapose estimation to be performed. The method includes capturing a modelimage of a scene at a pre-determined canonical camera pose, initializinga current camera pose to the pre-determined canonical camera pose,generating an image library from a plurality of warped images of themodel image and the model image, wherein each warped image is atransformation of the model image at a different pre-determined camerapose, and wherein the image library includes the predetermined camerapose for each warped image and for the model image, capturing a firstimage of the scene as a user moves the camera, reporting the currentcamera pose as a camera pose of the first image when the first image isacceptable, adding the first image to the image library when the firstimage is acceptable, a sufficient amount of time has passed sinceanother captured image was added to the image library, and the camerapose of the first image is sufficiently different from all camera posesin the image library, wherein adding the first image includes adding thecamera pose of the first image to the image library, and re-initializingthe current camera pose to a camera pose selected from the image librarywhen the first image is not acceptable.

BRIEF DESCRIPTION OF THE DRAWINGS

Particular embodiments in accordance with the invention will now bedescribed, by way of example only, and with reference to theaccompanying drawings:

FIG. 1 is a block diagram of an example digital video camera;

FIG. 2 is a flow diagram of method; and

FIG. 3 is an example.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Specific embodiments of the invention will now be described in detailwith reference to the accompanying figures. Like elements in the variousfigures are denoted by like reference numerals for consistency.

Embodiments of the invention provide for camera pose initialization andre-initialization during use that does not require a-priori knowledge ofthe scene or the use of pose-invariant feature descriptors. Inembodiments of the invention, the initial (starting) pose of the camerais assumed to be known, i.e., when the application incorporating thecamera is initialized, a known canonical pose can be determined. From animage captured at this initial pose, warped versions are generated usingknown transformations. Features of each of the warped images and themodel image are computed. The features of each image and the associatedpose are saved in memory to form a library (set) of known images. As auser moves the camera, the image library is conditionally updated withfeatures and poses of new images. Further, if the current camera posecannot be determined, the camera pose is re-initialized by matchingfeatures of images captured as the user moves the camera to the currentimage library.

FIG. 1 is a block diagram of an example digital video camera 100configured to perform pose estimation as described herein. The digitalvideo camera 100 may be a standalone camera, or may be embedded in adevice such as a mobile phone, a tablet computer, a wearable device suchas eyeglasses, a handheld gaming device, etc. The camera 100 includes animaging component 102, a controller component 106, an image processingcomponent 104, a video encoder component 118, a memory component 110, avideo analytics component 112, a camera controller 114, and a networkinterface 116. The components of the camera 100 may be implemented inany suitable combination of software, firmware, and hardware, such as,for example, one or more digital signal processors (DSPs),microprocessors, discrete logic, application specific integratedcircuits (ASICs), field-programmable gate arrays (FPGAs), etc. Further,software instructions such as software instructions embodying at leastpart of the pose estimation may be stored in memory in the memorycomponent 110 and executed by one or more processors.

The imaging component 102 and the controller component 106 includefunctionality for capturing images of a scene. The imaging component 102includes a lens assembly, a lens actuator, an aperture, and an imagingsensor. The imaging component 102 also includes circuitry forcontrolling various aspects of the operation of the component, such as,for example, aperture opening amount, exposure time, etc. The controllermodule 106 includes functionality to convey control information from thecamera controller 114 to the imaging component 102, and to providedigital image signals to the image processing component 104.

The image processing component 104 divides the incoming digital signalsinto frames of pixels and processes each frame to enhance the image datain the frame. The processing performed may include one or more imageenhancement techniques, such as, for example, one or more of blackclamping, fault pixel correction, color filter array (CFA)interpolation, gamma correction, white balancing, color spaceconversion, edge enhancement, denoising, contrast enhancement, detectionof the quality of the lens focus for auto focusing, and detection ofaverage scene brightness for auto exposure adjustment. Digital imagefrom the image processing component 104 are provided to the videoencoder component 108, the pose estimation component 118, and the videoanalytics component 112.

The video encoder component 108 encodes the images in accordance with avideo compression standard such as, for example, the Moving PictureExperts Group (MPEG) video compression standards, e.g., MPEG-1, MPEG-2,and MPEG-4, the ITU-T video compressions standards, e.g., H.263 andH.264, the Society of Motion Picture and Television Engineers (SMPTE)421 M video CODEC standard (commonly referred to as “VC-1”), the videocompression standard defined by the Audio Video Coding StandardWorkgroup of China (commonly referred to as “AVS”), the ITU-T/ISO HighEfficiency Video Coding (HEVC) standard, etc.

The memory component 110 may be on-chip memory, external memory, or acombination thereof. Any suitable memory design may be used. Forexample, the memory component 110 may include static random accessmemory (SRAM), dynamic random access memory (DRAM), synchronous DRAM(SDRAM), read-only memory (ROM), flash memory, a combination thereof, orthe like. Various components in the digital video camera 100 may storeinformation in memory in the memory component 110 as a video stream isprocessed. For example, the video encoder component 108 may storereference data in a memory of the memory component 110 for use inencoding frames in the video stream. Further, the memory component 110may store any software instructions that are executed by one or moreprocessors (not shown) to perform some or all of the describedfunctionality of the various components.

Some or all of the software instructions may be initially stored in acomputer-readable medium such as a compact disc (CD), a diskette, atape, a file, memory, or any other computer readable storage device andloaded and stored on the digital video camera 300. In some cases, thesoftware instructions may also be sold in a computer program product,which includes the computer-readable medium and packaging materials forthe computer-readable medium. In some cases, the software instructionsmay be distributed to the digital video camera 100 via removablecomputer readable media (e.g., floppy disk, optical disk, flash memory,USB key), via a transmission path from computer readable media onanother computer system (e.g., a server), etc.

The camera controller component 114 controls the overall functioning ofthe digital video camera 100. For example, the camera controllercomponent 114 may adjust the focus and/or exposure of the imagingcomponent 102 based on the focus quality and scene brightness,respectively, determined by the image processing component 104. Thecamera controller component 114 also controls the transmission of theencoded video stream via the network interface component 116 and maycontrol reception and response to camera control information receivedvia the network interface component 116. Further, the camera controllercomponent 114 controls the transfer information from the video analyticscomponent 112 via the network interface component 116.

The network interface component 116 allows the digital video camera 100to communicate with a monitoring system. The network interface component116 may provide an interface for a wired connection, e.g., an Ethernetcable or the like, and/or for a wireless connection. The networkinterface component 116 may use any suitable network protocol(s).

The video analytics component 312 analyzes the content of images in thecaptured video stream to detect and determine temporal events not basedon a single image. The analysis capabilities of the video analyticscomponent 312 may vary in embodiments depending on such factors as theprocessing capability of the digital video camera 300, the particularapplication for which the digital video camera is being used, etc. Forexample, the analysis capabilities may range from video motion detectionin which motion is detected with respect to a fixed background model toface recognition, object recognition, gesture recognition, featuredetection and tracking, etc. As part of the analysis of the content ofimages, the video analytics component 312 may use the estimated posefrom the pose estimation component 118. Knowledge of the pose of thecamera can help in improving the accuracy of video analysis tasks suchas face or object recognition. For example, knowing the orientation ofthe camera can inform a face recognition algorithm of the likelihood offinding faces at a particular orientation in the image.

The pose estimation component 118 includes functionality to determine aninitial pose of the camera 100 when an application needing poseestimation is started, to track the current pose of the camera 100, andto recover (re-initialize) the pose of the camera 100 in the event thatincoming images are not sufficient (e.g., due to noise or temporalinconsistencies such as motion blur or dropped frames) to continue thepose tracking. The pose estimation component 118 is configured toperform a method for pose estimation as described herein in reference toFIG. 2.

FIG. 2 is a flow diagram of a method for camera pose estimation that maybe performed, for example, in a digital camera such as that of FIG. 1.This method may be viewed in three parts: pose estimationinitialization, pose estimation normal operation, i.e., pose tracking,and pose estimation recovery. For initialization, e.g., at applicationstart-up, a “model” image M is captured 200 when the camera is placed ina pre-defined canonical pose. That is, the image M is captured when thecamera is positioned in a known orientation (pose). A typical example ofsuch a known pose is a fronto-parallel orientation, where the cameraplane is parallel to the scene plane. In some embodiments, input sourcessuch as inertial sensors (gyroscopes, accelerometers, etc.) may be usedto automatically identify when the camera is in a known, canonical pose.The initial camera pose for this model image is denoted as P_(M).

Given the model image M, n transformed (warped) versions of the imageare generated 202 by applying known transformations. That is, each of nwarped images W_(i), 1≦i≦n, are generated by applying a transformationT_(i), to the model image M to generate an image W_(i) that replicateshow the planar scene in the image M would appear if the camera is at adifferent pose:W _(i) =T _(i)(M)Any suitable transformations may be used. The transformations T_(i)correspond to common (expected) poses relative to the model M. Forexample, if the scene is assumed to be planar, a common transformationthat may be used is a homography which is a 3×3 matrix of nineparameters. The set of nine parameters of a homography matrix describesthe perspective transformation of a planar scene. Each homography matrixcorresponds to a particular rotation and translation (or pose) of acalibrated camera with respect to the planar scene. Application of thismatrix to the model image M results in an image W_(i) corresponding tohow the camera would see the scene when placed in a particular positioncorresponding to the parameters.

The effect of applying the transformation to the model image is tocreate n warped images, W_(i), that capture the appearance of the planarscene of the model image from n different camera poses. That is, thetransformations T_(i) simulate n known camera poses. Any suitable valueof n, e.g., 80, may be used. Some factors that may be considered in thechoice of the value of n include: 1) the larger the value of n, thelarger the amount of time needed to generate the warped images and thelarger the amount of memory needed to store the warped images and theassociated pose data; 2) the larger the library, the longer the amountof time needed to search the library for matches (the importance ofwhich will be apparent in later detailed description); and 3) n issufficiently large such that the library is adequate for pose estimation(i.e., too few warped images will provide unsatisfactory results).

Features are also extracted 204 and stored for each of the warped imagesW_(i) and the model image M. The features of the ith image are denotedby A feature typically corresponds to a point in the image and isrepresented by a descriptor that captures the appearance of the localneighborhood around that point. Any suitable technique may be used tocompute the features for an image. An example of a suitable techniquemay be found in G. Klein and D. Murray, “Parallel Tracking and Mappingon a Camera Phone,” Proc. Eighth International Symposium on Mixed andAugmented Reality, pp. 83-86, October, 2009, Orlando, Fla.

Note that the net effect of the pose estimation initialization, i.e.,capturing the model image, generating the warped images, and extractingthe features of each image, is the generation of a library, or set, ofknown images S={(F₀, P₀), (F₁, P₁), (F₂, P₂), (F₃, P₃) . . . (F_(n),P_(n))}. For simplicity, the model image is considered to be part of theset of images, i.e., let M=W₀=T₀(M), where T₀ is the identity matrix.The library of images may be stored in the memory 110 of the camera 100of FIG. 1.

Once the pose estimation is initialized, the pose tracking begins, i.e.,the camera pose is continually updated and reported for images in theinput video stream. Images are captured 208 as the camera (or a deviceincorporating the camera) is moved. If an image captured at time t isacceptable 210, e.g., the image is not too noisy and/or is temporallyconsistent, the current pose is reported 212 to interested components,e.g., the video analytics component 112. The image may also be added 212to the image library under certain conditions. In some embodiments, thenumber of images that may be added to the image library is limited tosome number, e.g., 20, and new images are added in a first-in-first out(FIFO) fashion.

At time t, an image (i.e., the associated pose and computed features) isadded to the image library if the following two conditions aresatisfied. First, the condition t−s>D₁ must be satisfied where s is thetime when the last image was added to the image library and D₁ is anelapsed time threshold. In other words, the current image is added if asufficient amount of time D₁ has passed since the last entry into theset. The value of D₁ may be any suitable value. The choice of a valuefor D₁ may depend on factors such as how fast the camera is expected tomove for a particular application and how much memory and compute powerthe device has to process new entries in the library.

Second, the condition difference (P_(t), P_(i))>D₂, for all P_(i)elements of the library S must be satisfied where D₂ is a differencethreshold. That is, the pose P_(t) of the current image must besufficiently different from all the poses contained in the image libraryS. Any suitable technique may be used to determine the pose P_(t). Insome embodiments, a camera pose P may be represented as the [x, y, z]coordinates of the camera position and another triplet that representsthe camera orientation. Thus, computation of the difference between thecurrent pose P_(t) and the poses in the image library may be veryefficient—how far apart are the two poses and the angle between the twoposes.

The value of D₂ may be any suitable value. The choice of a value for D₂may depend on factors such as how fast the camera is expected to movefor a particular application and how much memory and compute power thedevice has to process new entries in the library. Note that if thevalues of D₁ and/or D₂ are low, many images may be added to the library,causing high load on system resources. Conversely, if the values of D₁and/or D₂ are high, the library may not contain enough landmark imagesat different poses to effectively help in pose re-initialization.

FIG. 3 is an example of a set of initial poses P_(i), 0<=i<=n, andcamera poses added to the image library S as the camera is moved throughthe scene. This example shows the various initial poses in two rings ora hemisphere looking down at the scene. The different shading indicatedifferent poses in the three dimensional scene. The small circlesindicate images/poses added to the image library as the camera is movedalong the indicated trajectory.

Referring again to FIG. 2, if an image captured at time t, I_(t), is notacceptable 210, then the user experience has been interrupted and camerapose update cannot continue as the images being received are notsuitable for continuing pose estimation without re-initialization. Atthis point, a pose estimation re-initialization phase is entered withthe assumption that the camera is moved in space within the scene withthe intent of resuming the user experience. The image captured at timet−1, i.e., the features of image I_(t−1) and the corresponding poseP_(t−1), are added 214 to the image library. Since the pose update isinterrupted at time t, the image at time t−1 is assumed to be capturedat a valid pose.

After the image I_(t−1) is added to the image library, an attempt ismade to find a match 216 between the current image I_(t) and an image inthe image library (as augmented by images added as the camera wasmoved). If a match is found, then the current pose is set 218 to thepose of the matching image and normal pose estimation processingcontinues 208 with the next image. If no match is found 216, then thenext image is captured 220 and an attempt is made to match 216 thisimage with one of the images in the set of warped images. The captureand match process is repeated until a match is found and the pose isre-initialized.

Since the size of the image library (set) S can be large, the process ofsearching for the best match may be split across several time instancesto enable real time processing. Any suitable approach may be used forsearching the image library. One approach that may be used is asfollows. First, the current image is compared to the most recentaddition to the library S, i.e., I_(t−1). If there is no match, then thecurrent image is compared to the model image M. If there is no match,then the current image is compared against m other images in the imagelibrary.

All the comparisons are done in feature space. That is, the featuresF_(t) of the image I_(t) are first compared to the features F_(t−1) ofthe most recent image I_(t−1) added to the library S. If the match scoreexceeds a pre-defined threshold, then the current image I_(t) matcheswith that image. Any suitable technique may be used to determine thematch score. For example, the match score may be some form of distancemeasure between the features. In some embodiments, symmetric transfererror is used to quantify the match between feature sets. The value ofthe matching threshold may be determined empirically based on the amountof noise expected in the image capture process and the amount and speedof motion expected.

If the match score is below the threshold, the features F_(t) arecompared to the features F₀ of the model image M. If the match score isagain below the threshold, then the features are compared to thefeatures of a maximum of m images from the set. As soon as asatisfactory match is found, the pose is updated to the pose of thematching image. If none of the m images are a satisfactory match, thecurrent camera pose is declared to be invalid, and the next input image,I_(t+1) is processed. Again, F_(t+1) is first compared to F_(t−1). Ifthere is no match, then F_(t+1) is compared to F₀. If there is no match,a new set of m library images are chosen for evaluation. The m images attime t+1 are distinct from those compared at time t. If no match isfound, the same process repeats at time t+2, etc.

In this way, if there are n images in the library, n/m time instancesare needed to search the entire library for a valid match. For example,assume that the library size is n=100, where there are 80 imagescorresponding the set of warped images generated at initialization, and20 images corresponding to a circular buffer of images added to theimage library during normal pose estimation. In order to meet real-timeconstraints, m may be limited to 2. Therefore, during posere-initialization, every input image is compared against the imageI_(t−1), the model image M, and at most 2 other library images until amatch is found. The library images are exhausted after 50 input images.Then, as new input images are captured, the library is searched again.Assuming a modest processing rate of 15 fps, it takes about 3 seconds tosearch through a library of 100 images.

OTHER EMBODIMENTS

While the invention has been described with respect to a limited numberof embodiments, those skilled in the art, having benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the invention as disclosed herein. Forexample, embodiments are described herein in which features and posesare stored in an image library. One of ordinary skill in the art willunderstand embodiments in which rather than storing features in thelibrary, the images and feature coordinates are stored.

Embodiments of the methods described herein may be implemented inhardware, software, firmware, or any combination thereof. If completelyor partially implemented in software, the software may be executed inone or more processors, such as a microprocessor, application specificintegrated circuit (ASIC), field programmable gate array (FPGA), ordigital signal processor (DSP). The software instructions may beinitially stored in a computer-readable medium and loaded and executedin the processor. In some cases, the software instructions may also besold in a computer program product, which includes the computer-readablemedium and packaging materials for the computer-readable medium. In somecases, the software instructions may be distributed via removablecomputer readable media, via a transmission path from computer readablemedia on another digital system, etc. Examples of computer-readablemedia include non-writable storage media such as read-only memorydevices, writable storage media such as disks, flash memory, memory, ora combination thereof.

It is therefore contemplated that the appended claims will cover anysuch modifications of the embodiments as fall within the true scope ofthe invention.

What is claimed is:
 1. A method of camera pose estimation in a camera,the method comprising: capturing a model image of a scene at apre-determined canonical camera pose; initializing a current camera poseto the pre-determined canonical camera pose; generating an image libraryfrom a plurality of warped images of the model image and the modelimage, wherein each warped image is a transformation of the model imageat a different pre-determined camera pose, and wherein the image librarycomprises the predetermined camera pose for each warped image and forthe model image; capturing a first image of the scene as a user movesthe camera; reporting the current camera pose as a camera pose of thefirst image when the first image is acceptable; adding the first imageto the image library when the first image is acceptable, a sufficientamount of time has passed since another captured image was added to theimage library, and the camera pose of the first image is sufficientlydifferent from all camera poses in the image library, wherein adding thefirst image comprises adding the camera pose of the first image to theimage library; and re-initializing the current camera pose to a camerapose selected from the image library when the first image is notacceptable.
 2. The method of claim 1, wherein generating an imagelibrary comprises computing features of each warped image and the modelimage, wherein the image library further comprises the features of eachwarped image and the model image; and adding the first image to theimage library comprises computing features of the first image, whereinadding the first image comprises adding the features of the first imageto the image library.
 3. The method of claim 1, wherein re-initializingthe current camera pose comprises: adding a second image to the imagelibrary, wherein the second image was captured prior to the first image,and adding the second image comprises adding a camera pose of the secondimage to the image library; comparing features of the first image tofeatures of at least one image in the image library; and setting thecurrent camera pose to the camera pose of a library image if thefeatures of the first image match the features of the library image. 4.The method of claim 3, wherein re-initializing the current camera posefurther comprises: comparing features of a third image to features of atleast one image in the image library if the features of the first imagedo not match the features of any library image to which the first imagewas compared, wherein the third image is captured after the first image;and setting the current camera pose to the camera pose of a libraryimage if the features of the third image match the features of thelibrary image.
 5. The method of claim 4, wherein comparing features ofthe first image comprises: comparing the features of the first image tofeatures of the second image; comparing the features of the first imageto features of the model image when the features of the first image donot match the features of the second image; and comparing the featuresof the first image to features of a selected first subset of otherimages in the image library when the features of the first image do notmatch the features of the model image.
 6. The method of claim 5, whereincomparing features of the third image comprises: comparing the featuresof the third image to features of the second image; comparing thefeatures of the third image to features of the model image when thefeatures of the third image do not match the features of the secondimage; and comparing the features of the third image to features of aselected second subset of other images in the image library when thefeatures of the third image do not match the features of the modelimage, wherein the second subset is different from the first subset. 7.An apparatus configured to perform camera pose estimation, the apparatuscomprising: means for capturing a model image of a scene at apre-determined canonical camera pose; means for initializing a currentcamera pose to the pre-determined canonical camera pose; means forgenerating an image library from a plurality of warped images of themodel image and the model image, wherein each warped image is atransformation of the model image at a different pre-determined camerapose, and wherein the image library comprises the predetermined camerapose for each warped image and for the model image; means for capturinga first image of the scene as a user moves the apparatus; means forreporting the current camera pose as a camera pose of the first imagewhen the first image is acceptable; means for adding the first image tothe image library when the first image is acceptable, a sufficientamount of time has passed since another captured image was added to theimage library, and the camera pose of the first image is sufficientlydifferent from all camera poses in the image library, wherein adding thefirst image comprises adding the camera pose of the first image to theimage library; and means for re-initializing the current camera pose toa camera pose selected from the image library when the first image isnot acceptable.
 8. The apparatus of claim 7, wherein means forgenerating an image library computes features of each warped image andthe model image, wherein the image library further comprises thefeatures of each warped image and the model image; and the means foradding the first image to the image library computes features of thefirst image, wherein adding the first image comprises adding thefeatures of the first image to the image library.
 9. The apparatus ofclaim 7, wherein the means for re-initializing the current camera posecomprises: means for adding a second image to the image library, whereinthe second image was captured prior to the first image, and adding thesecond image comprises adding a camera pose of the second image to theimage library; means for comparing features of the first image tofeatures of at least one image in the image library; and means forsetting the current camera pose to the camera pose of a library image ifthe features of the first image match the features of the library image.10. The apparatus of claim 9, wherein the means for re-initializing thecurrent camera pose further comprises: means for comparing features of athird image to features of at least one image in the image library ifthe features of the first image do not match the features of any libraryimage to which the first image was compared, wherein the third image iscaptured after the first image; and means for setting the current camerapose to the camera pose of a library image if the features of the thirdimage match the features of the library image.
 11. The apparatus ofclaim 10, wherein the means for comparing features of the first imagecomprises: means for comparing the features of the first image tofeatures of the second image; means for comparing the features of thefirst image to features of the model image when the features of thefirst image do not match the features of the second image; and means forcomparing the features of the first image to features of a selectedfirst subset of other images in the image library when the features ofthe first image do not match the features of the model image.
 12. Theapparatus of claim 11, wherein the means for comparing features of thethird image comprises: means for comparing the features of the thirdimage to features of the second image; means for comparing the featuresof the third image to features of the model image when the features ofthe third image do not match the features of the second image; and meansfor comparing the features of the third image to features of a selectedsecond subset of other images in the image library when the features ofthe third image do not match the features of the model image, whereinthe second subset is different from the first subset.
 13. Anon-transitory computer readable medium storing software instructionsthat, when executed by at least one processor in a camera, cause amethod of camera pose estimation to be performed, the method comprising:capturing a model image of a scene at a pre-determined canonical camerapose; initializing a current camera pose to the pre-determined canonicalcamera pose; generating an image library from a plurality of warpedimages of the model image and the model image, wherein each warped imageis a transformation of the model image at a different pre-determinedcamera pose, and wherein the image library comprises the predeterminedcamera pose for each warped image and for the model image; capturing afirst image of the scene as a user moves the camera; reporting thecurrent camera pose as a camera pose of the first image when the firstimage is acceptable; adding the first image to the image library whenthe first image is acceptable, a sufficient amount of time has passedsince another captured image was added to the image library, and thecamera pose of the first image is sufficiently different from all cameraposes in the image library, wherein adding the first image comprisesadding the camera pose of the first image to the image library; andinitializing the current camera pose to a camera pose selected from theimage library when the first image is not acceptable.
 14. The computerreadable medium of claim 13, wherein generating an image librarycomprises computing features of each warped image and the model image,wherein the image library further comprises the features of each warpedimage and the model image; and adding the first image to the imagelibrary comprises computing features of the first image, wherein addingthe first image comprises adding the features of the first image to theimage library.
 15. The computer readable medium of claim 13, whereinre-initializing the current camera pose comprises: adding a second imageto the image library, wherein the second image was captured prior to thefirst image, and adding the second image comprises adding a camera poseof the second image to the image library; comparing features of thefirst image to features of at least one image in the image library; andsetting the current camera pose to the camera pose of a library image ifthe features of the first image match the features of the library image.16. The computer readable medium of claim 15, wherein re-initializingthe current camera pose further comprises: comparing features of a thirdimage to features of at least one image in the image library if thefeatures of the first image do not match the features of any libraryimage to which the first image was compared, wherein the third image iscaptured after the first image; and setting the current camera pose tothe camera pose of a library image if the features of the third imagematch the features of the library image.
 17. The computer readablemedium of claim 16, wherein comparing features of the first imagecomprises: comparing the features of the first image to features of thesecond image; comparing the features of the first image to features ofthe model image when the features of the first image do not match thefeatures of the second image; and comparing the features of the firstimage to features of a selected first subset of other images in theimage library when the features of the first image do not match thefeatures of the model image.
 18. The computer readable medium of claim17, wherein comparing features of the third image comprises: comparingthe features of the third image to features of the second image;comparing the features of the third image to features of the model imagewhen the features of the third image do not match the features of thesecond image; and comparing the features of the third image to featuresof a selected second subset of other images in the image library whenthe features of the third image do not match the features of the modelimage, wherein the second subset is different from the first subset.